package com.hr.builder;

import org.springframework.stereotype.Component;

import com.espirit.eap.manager.ModelBuilderSupport;
import com.hr.SalaryEmployeeDefine;


@Component
public class SalaryEmployeeDefineBuilder extends ModelBuilderSupport {
	static final String EMPLOYEE = "employee";
//	static final String SCOPE = "scope";
	
	static final String MONTH_SALARY_DAYS = "monthSalaryDays";
	static final String DAY_SALARY_HOURS = "daySalaryHours";
	
	@Override
	public boolean init() {
		return super.setClass(SalaryEmployeeDefine.class, "Employee Salary Define", "员工薪水定义");
	}

	@Override
	public void buildFields() {
		super.buildFields();
		addModelField(EMPLOYEE, "Employee", "职员");
//		addModelField(SCOPE, "Scope", "时间范围");
		addModelField(MONTH_SALARY_DAYS, "Month salary days", "月计薪天数");
		addModelField(DAY_SALARY_HOURS, "Day salary hours", "日计薪小时(h)");
	}
	
	@Override
	protected void setDefaultLayoutButtons() {
		
	}
	
//	@Override
//	protected void addSearchFields() {
//		super.addSearchField(convertPropertyToField(DEPARTMENT));
//	}
	
	@Override
	protected void addListFields() {
		addListField(convertPropertyToField(EMPLOYEE, MONTH_SALARY_DAYS, DAY_SALARY_HOURS));
	}
	
//	@Override
//	protected void addDetailFields() {
//		addDetailField(convertPropertyToField(DEPARTMENT, SCOPE));
//	}
//	
//	@Override
//	protected void gatherExproperties() {
//		exProperties.put(REQUIRED, new String[]{DEPARTMENT, SCOPE});
//	}
	
	
}
